<?php

class Application_Model_DbTable_Pagamento extends Zend_Db_Table_Abstract
{

    protected $_name = 'pagamento';
    protected $_referenceMap = array
    (
       array(
            'refTableClass' => 'Application_Model_DbTable_TituDep',
            'refColumns' => 'id',
            'columns' => array('TituDep_id')
        )
    );

    public function insert($data)
    {        
        $dataAux = explode("/", $data['mes_referencia']);
        $data['mes_referencia'] = $dataAux[1].'-'.$dataAux[0].'-01';
        parent::insert($data);
    }
    
}

